idate
Format local time/date as integer
idate()
function formats the local time/date as an integer.
Note: The idate()
function only accepts one character as format parameter!
Format local time/date as integer. Test all different formats:
<?php echo IDate ( "B" ) . "<br>" ; echo IDate ( "d" ) . "<br>" ; echo IDate ( "h" ) . "<br>" ; echo IDate ( "H" ) . "<br>" ; echo IDate ( "i" ) . "<br>" ; echo IDate ( "I" ) . "<br>" ; echo IDate ( "L" ) . "<br>" ; echo IDate ( "m" ) . "<br>" ; echo IDate ( "s" ) . "<br>" ; echo IDate ( "t" ) . "<br>" ; echo IDate ( "U" ) . "<br>" ; echo IDate ( "w" ) . "<br>" ; echo IDate ( "W" ) . "<br>" ; echo IDate ( "y" ) . "<br>" ; echo IDate ( "Y" ) . "<br>" ; echo IDate ( "z" ) . "<br>" ; echo IDate ( "Z" ) . "<br>" ; ?>
Try it yourself
IDate ( format , timestamp ) ;
parameter | describe |
---|---|
format |
Required. Specifies how to return the result:
|
timestamp | Optional. Specifies a Unix timestamp that represents the date/time that needs to be formatted. The default is the current local time (time()). |